Skip to content

Conversation

@mattsse
Copy link
Collaborator

@mattsse mattsse commented Jan 31, 2026

Summary

Refactors the transaction iterator spawning in payload processor for cleaner code.

Changes

  • Add transaction_count to ExecutionEnv: The transaction count is now part of the execution environment metadata, removing redundant parameter passing through spawn_caching_with and PrewarmCacheTask.

  • Use rayon::spawn for parallel tx conversion: The parallel iterator work was using spawn_blocking, but since for_each_with on a ParallelIterator already runs on rayon's thread pool, rayon::spawn is more semantically correct and avoids unnecessary indirection.

Testing

  • cargo check -p reth-engine-tree passes
  • cargo +nightly clippy -p reth-engine-tree --all-features passes

@mattsse mattsse added the A-engine Related to the engine implementation label Jan 31, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Jan 31, 2026
@mattsse mattsse force-pushed the mattsse/payload-processor-tx-iter-refactor branch from 97eef8f to d3a0090 Compare January 31, 2026 20:15
- Add transaction_count to ExecutionEnv, removing redundant parameter passing
- Use rayon::spawn instead of spawn_blocking for parallel tx conversion
- Remove transaction_count_hint parameter from spawn_caching_with and PrewarmCacheTask

Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-019c157e-9967-76f6-bfeb-25f84b7b72b9
@mattsse mattsse force-pushed the mattsse/payload-processor-tx-iter-refactor branch from d3a0090 to 9d28a20 Compare January 31, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-engine Related to the engine implementation

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants